{% extends '::base.html.twig' %}

{% block title %}Survey{% endblock %}
{% block body %}{%block content %}
    <h1>Lista wartości referencyjnych</h1>

    <table class="records_list">
        <thead>
            <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Createdat</th>
                <th>Updatedat</th>
                <th>Refvalue</th>
                <th>Imageurl</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
        {% for entity in entities %}
            <tr>
                <td><a href="{{ path('wantuch_ref_val_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
                <td>{{ entity.name }}</td>
                <td>{% if entity.createdAt %}{{ entity.createdAt|date('Y-m-d H:i:s') }}{% endif %}</td>
                <td>{% if entity.updatedAt %}{{ entity.updatedAt|date('Y-m-d H:i:s') }}{% endif %}</td>
                <td>{{ entity.refValue }}</td>
                <td><img src="{{ entity.imageurl }}" width="100" /></td>
                <td>
                <ul>
                    <li>
                        <a href="{{ path('wantuch_ref_val_show', { 'id': entity.id }) }}">show</a>
                    </li>
                    <li>
                        <a href="{{ path('wantuch_ref_val_edit', { 'id': entity.id }) }}">edit</a>
                    </li>
                </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

        <ul>
        <li>
            <a href="{{ path('wantuch_ref_val_new') }}">
                Create a new entry
            </a>
        </li>
    </ul>
    {% endblock %} {% endblock %}
